package com.easybuilder.blog.service;

import com.easybuilder.blog.dto.ArticleDTO;
import com.easybuilder.blog.entity.Article;
import com.easybuilder.blog.entity.ArticleCriteria;
import com.easybuilder.common.base.entity.Page;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

public interface ArticleService {

    Article publish(Article article);

    Article selectOneByExample(Example example);

    Page<ArticleDTO> page(int pageNum, int pageSize, ArticleCriteria articleCriteria);

    int getTotal(ArticleCriteria articleCriteria);

    int batchDelete(List<Long> ids);

    List<Integer> countArticle();

    ArticleDTO getArticleById(Long id);

    Long countArticleByUserId(Long userId);
}
